from autoframe.common.base import *
class Order_Management(Base):
    def order(self):
        self.iframe((By.ID, 'menu-frame'))#进入嵌套
        #定位订单管理按钮,点击跳转
        self.click((By.CLASS_NAME,'icon-order'))
        #定位订单号
        self.driver.switch_to.default_content()
        self.iframe((By.ID, 'main-frame'))
        self.order1 = self.get_element_text((By.ID,'order_0'))
        #点击查看订单按钮
        self.click((By.XPATH,'//tbody/tr[3]/td[7]/a'))
        #定位订单号获取订单号
        self.order2 = self.get_element_text((By.XPATH, '/html/body/form/div[1]/table/tbody/tr[3]/td[2]'))
